package com.example.demo.dao;

import com.example.demo.pojo.ActivitiesAreaGood;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ActivitiesAreaGoodDao {
    int deleteByPrimaryKey(Integer id);

    int insert(ActivitiesAreaGood record);

    int insertSelective(ActivitiesAreaGood record);

    ActivitiesAreaGood selectByPrimaryKey(Integer id);

    @Select("select * from activities_area_good where repertoryId=#{repertoryId}")
    List<ActivitiesAreaGood> selectAll(int repertoryId);

    int updateByPrimaryKeySelective(ActivitiesAreaGood record);

    int updateByPrimaryKey(ActivitiesAreaGood record);

    @Select("select * from activities_area_good where repertoryid=#{repertoryid} and activityesareaid=#{activityesareaid}")
    List<ActivitiesAreaGood> selectByrepertoryid(@Param("repertoryid") Integer repertoryid,
                                                 @Param("activityesareaid") Integer activityesareaid);
}